<template>
	<view class="" style="padding: 25rpx;">
		<view class="amount-money-wrap">
			<view class="amount-money">
				<view class="money">{{datas.balance}}</view>
				<view class="money">{{datas.wage}}</view>
			</view>
			<view class="amount-money">
				<view class="money-title">我的金额</view>
				<view class="money-title">结算中金额</view>
			</view>
		</view>
		<view class="withdrawal-flex border-bottom">
			<view class="amount">结算金额</view>
			<input type="text" v-model="amount"  placeholder="请输入结算金额">
		</view>
		<view class="withdrawal-flex padding-top">
			<view class="alipay">支付宝</view>
			<input type="text" v-model="zhifubao" placeholder="请输入支付宝收款账户">
		</view>
		<view class="submit" @click="btn">提交</view>
	
	</view>
</template>

<script>
	export default {
		data() {
			return {
				datas:{},
				amount:'',
				zhifubao:''
			}
		},
		onLoad() {
		
		},
		onShow() {
			this.getdata()
		},
		methods: {			
			show(){
				this.visible = true;
			},
			getdata(){
				this.$http.getReq("/api/sale/withdraw",{
					token:uni.getStorageSync('token')
				}).then(res => {
					this.datas=res.data
				});
			},
			btn(){
				this.$http.postReq("/api/sale/withdraw",{
					amount:this.amount,
					zhifubao:this.zhifubao
				}).then(res => {
					if(res.code=="200"){
						uni.showToast({
							title:res.msg,
							icon:"success"
						})
						that.share = false;
					}else{
						uni.showToast({
							title:res.msg,
							icon:"none"
						})
					}
				});
			}
		}		
	}
	
	
</script>

<style>
	.amount-money-wrap{
		margin: 50rpx;
	}
	.amount-money{
		display: flex;
		justify-content: space-between;			
	}
	.money{
		color: #444C53;
		font-size: 42rpx;		
		width: 30%;
		text-align: center;	
		margin-bottom: 20rpx;
	}
	.money-title{
		color: #444C53;
		font-size: 29rpx;		
		width: 30%;
		text-align: center;	
	}
	.withdrawal-flex{
		display: flex;
		align-items: center;
		padding-top: 50rpx;		
	}
	.border-bottom{
		padding-bottom: 50rpx;
		border-bottom: 1rpx solid #C0C4CC;
	}
	.amount,.alipay{
		 font-size: 32rpx;
		 width: 20%;		
		 margin-right: 25rpx;
	}
	.submit{
		border: 3rpx solid #C0C4CC;
		text-align: center;
		padding: 18rpx;
		border-radius: 10rpx;
		color: #444C53;
		margin-top: 40rpx;
		font-size: 36rpx;
	}
	
</style>